<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="language" content="en" />
    <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->theme->baseUrl; ?>/css/styles.css" />
    <link rel="stylesheet" type="text/css" href="/PATH/assets/f72b359d/style.css" />
	<script type="text/javascript" src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/40A567de/jquery.js"></script>
	<script type="text/javascript" src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/40A567de/jquery.cookie.js"></script>
    
	<title><?php echo CHtml::encode($this->pageTitle); ?></title>
	<?php Yii::app()->clientScript->registerCoreScript('jquery'); ?>
	<?php Yii::app()->bootstrap->register(); ?>
</head>
<body>

<?php $this->widget('TbNavbar',array(
    'items'=>array(
        array(
            'class'=>'TbMenu',
            'items'=>array(
                array('label'=>'Home', 'url'=>array('/challenge/index'), 'visible'=>!Yii::app()->user->isGuest),
            	array('label'=>'Propostas', 'url'=>array('/proposal/index'), 'visible'=>!Yii::app()->user->isGuest),
                array('label'=>'Usuários', 'url'=>array('/user/admin'), 'visible'=>(array_key_exists('user',$_SESSION) != null && $_SESSION['user']->type == 'ADMINISTRATOR')),
                array('label'=>'Sobre', 'url'=>array('/site/page', 'view'=>'about')),
            	array('label'=>'Login', 'url'=>array('/site/login'), 'visible'=>Yii::app()->user->isGuest),
                array('label'=>'Logout ('.Yii::app()->user->name.')', 'url'=>array('/site/logout'), 'visible'=>!Yii::app()->user->isGuest)
            ),
        ),
    ),
)); ?>

<div class="container" id="page">

	<?php if(isset($this->breadcrumbs)):?>
		<?php $this->widget('bootstrap.widgets.TbBreadcrumbs', array(
			'links'=>$this->breadcrumbs,
		)); ?><!-- breadcrumbs -->
	<?php endif?>
	<?php echo $content; ?>

	<div class="clear"></div>

</div><!-- page -->

	<div id="footer">
			<?php echo '<p align="center">© UFAM - Universidade Federal do Amazonas</p>';
			echo '<p align="center">ICOMP - Instituto de Computação - Desenvolvido na disciplina Programação Web - 2014/02</p>'; ?>
	</div>
</body>
</html>
